/** 本组件用于mixin或继承，但仅限于根组件的占位，要非根组件的占位请使用v-placeholder */
import { withDirectives } from "vue"
import placeholder from "../__directives/placeholder"
import withvnode from "../__mixin/withvnode"

export default injectRender({
  extends: withvnode,
  props: {
    /** 是否生成和this.$el一样尺寸的占位符 */
    placeholder: {
      type: Boolean,
      default: true,
    },
  },
  render2(vnode) {
    withDirectives(this.getVNode(vnode), [
      [placeholder, this.placeholder, {}]
    ]);
  }
})